/*
 * Example1.java
 *
 * Created on 4 de enero de 2007, 11:50 AM
 */

package shortestPath;

/**
 *
 * @author tavobula
 */
public class Example1 {
    
    /** Creates a new instance of Example1 */
    public Example1() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        cflp.Network n=new cflp.Network("problemas/N50L2U2K75F17.txt");
        n.printNetwork();
        /**int[][] d=n.getCosts();
        double[][] sp=(new ConstructEdges(d,false,n.getArcsNumber())).getSP();
        java.text.DecimalFormat myFormatter = new java.text.DecimalFormat("0000");
        System.out.println("table sp(i,j)");
        System.out.println("          1           2           3           4           5           6           7           8           9           10          11          12          13          14          15          16          17          18          19          20          21          22          23          24          25          26          27          28          29          30          31          32          33          34          35          36          37          38          39          40          41          42          43          44          45          46          47          48          49          50");
        for(int i=0;i<sp.length;++i){
            if(i<=8)System.out.print((i+1)+" \t");
            if(i>8)System.out.print((i+1)+"\t");           
            for(int j=0;j<sp[i].length;++j){
                if(i!=j){
                    System.out.print(myFormatter.format(sp[i][j])+"\t");
                }else{System.out.print(myFormatter.format(0.0) +"\t");
                    
                }
               
            }
            System.out.println("");
        }
        System.out.println(";");
        int[][] s=n.getDistances();
              
        double[][] spd=(new ConstructEdges(s,false,n.getArcsNumber())).getSP();
        System.out.println("table rp(i,j)");
        System.out.println("          1           2           3           4           5           6           7           8           9           10          11          12          13          14          15          16          17          18          19          20          21          22          23          24          25          26          27          28          29          30          31          32          33          34          35          36          37          38          39          40          41          42          43          44          45          46          47          48          49          50");
        for(int i=0;i<sp.length;++i){
            if(i<=8)System.out.print((i+1)+" \t");
            if(i>8)System.out.print((i+1)+"\t");           
            for(int j=0;j<spd[i].length;++j){
                if(i!=j){
                    System.out.print(myFormatter.format(spd[i][j])+"\t");
                }else{System.out.print(myFormatter.format(0.0) +"\t");
                    
                }
               
            }
            System.out.println("");
        }
        System.out.println(";");**/
    }
}
